package com.jzo2o.market.mapper;

import com.jzo2o.market.model.domain.Activity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author itcast
 * @since 2023-09-16
 */
public interface ActivityMapper extends BaseMapper<Activity> {
    @Select("select  stockNum from activity where id =#{id}")
    int getCouponCount(Long id);
    @Update("update activity set stockNum = stockNum - 1 where id = #{id}")
    int updateStock(Long id, int i);
}
